# Set include dir
include_directories(include)
include_directories(/usr/local/cuda/include)
link_directories(/usr/local/cuda/lib64)

# Set C++11 standard
add_definitions(-std=c++11)
set(CMAKE_CUDA_STANDARD 11)
set(CMAKE_CUDA_STANDARD_REQUIRED ON)

find_package(CUDA REQUIRED)

# Make CudaCV library
set(edge_tensor_kernel_list
    source/edge_tensor_kernel/convert_type.cu
    source/edge_tensor_kernel/normalize.cu 
    source/edge_tensor_kernel/segmentation.cu 
    source/edge_tensor_kernel/transpose.cu
    source/edge_tensor_kernel/convert_color.cu
    source/edge_tensor_kernel/concat.cu
    source/edge_tensor_kernel/draw.cu
    source/edge_tensor_kernel/resize.cu
    source/edge_tensor_kernel/flip.cu
    source/edge_tensor_kernel/rect.cu
)
cuda_add_library(edge_tensor_kernel SHARED ${edge_tensor_kernel_list})
target_link_libraries(edge_tensor_kernel nvinfer cudart)
add_library(edge_tensor SHARED source/edge_tensor.cpp)
target_link_libraries(edge_tensor edge_tensor_kernel)
